<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">


<h:body>

<h:form>  
                <h:messages errorClass="error"/>  
                <h:inputHidden id="hidden" value="#{productBean.newProduct.productId}" />
                  
                <h:panelGrid columns="4" cellpadding="5" columnClasses="label, value" styleClass="grid">
                
                  	
                    <h:outputText value="ProductName: *" />  
                    <p:inputText required="true" label="ProductName"   
                            value="#{productBean.newProduct.productName}" />  
                      
                    <h:outputText value="GlobalpriceFlag: *" />  
                    <p:selectOneMenu value="#{productBean.newProduct.globalpriceFlag}">  
			            <f:selectItem itemLabel="YES" itemValue="true" />  
			            <f:selectItem itemLabel="NO" itemValue="false" />
			        </p:selectOneMenu>
                      
                    <h:outputText value="Globalprice: " />  
                    <p:inputText   value="#{productBean.newProduct.globalprice}" />
                    
                    <h:outputText value="Category: *" /> 
                    <p:selectOneMenu value="#{productBean.newProduct.categoryId}">  
			            <f:selectItem itemLabel="Select One" itemValue="" />  
			            <f:selectItems value="#{productBean.categoryList}" var="category" itemLabel="#{category.categoryName}" itemValue="#{category.categoryId}" />  
			        </p:selectOneMenu> 
			        
			        <h:outputText value="IsMan: *" />  
                    <p:selectOneMenu value="#{productBean.newProduct.isMan}">  
			            <f:selectItem itemLabel="YES" itemValue="true" />  
			            <f:selectItem itemLabel="NO" itemValue="false" />
			        </p:selectOneMenu>
			        
			        <h:outputText value="Discount Flag: *" />  
                    <p:selectOneMenu value="#{productBean.newProduct.discountFlag}">  
			            <f:selectItem itemLabel="NO" itemValue="false" />
			            <f:selectItem itemLabel="YES" itemValue="true" /> 
			        </p:selectOneMenu> 
			        
			        <h:outputText value="Discountprice: " />  
                    <p:inputText  value="#{productBean.newProduct.discountPrice}" />
                    
                    <h:outputText value="displayOrder: " />  
                    <p:inputText  value="#{productBean.newProduct.displayOrder}" />
        
                    <h:outputText value="ActiveStartTime: " />  
                    <p:calendar  value="#{productBean.newProduct.activeStartTime}" pattern="yyyy-MM-dd HH:mm"  />
                    
                    
                    <h:outputText value="ActiveEndTime: " />  
                    <p:calendar value="#{productBean.newProduct.activeEndTime}" pattern="yyyy-MM-dd HH:mm"  />
                     
                    
                    <h:outputText value="Description: " /> 
                    <p:editor id="editor" value="#{productBean.newProduct.productDescription}" width="600"/>   
                    
                </h:panelGrid>  
                
                <p:commandButton id="addCategoryButton" value="Submit" action="#{productBean.addProductSubmit}" update=":centerContentPanel"  />
                
                
</h:form> 


</h:body>

</html>